import React from 'react'
import axios from 'axios'
import {Card, WhiteSpace, WhiteBlank, WingBlank} from 'antd-mobile'
import {connect} from 'react-redux'
import {getUserList} from '../../redux/chartuser.redux'
import UserCard from '../usercard/usercard'
@connect(
    state=>state.chatuser,
    {getUserList}
)
class Boss extends React.Component {
    componentDidMount() {
        this.props.getUserList('genius')
    }
    render() {
        return (
            <UserCard userlist={this.props.userlist}></UserCard>
            // <WingBlank>
            //     {this
            //         .props
            //         .userlist
            //         .map(v => (v.avatar
            //             ? (<Card className='card_list' key={v._id} onClick={()=>{this.handleClick(v)}}>
            //                     <Card.Header   extra={<span>{v.title}</span>} title={v.user} thumb={require(`../img/${v.avatar}.jpg`)}></Card.Header>
            //                     <Card.Body>{v.desc.split('n').map(v=>(
            //                         <div key={v}>{v}</div>
            //                     ))}</Card.Body>
            //                 </Card>
            //         ): null))}
            // </WingBlank>
        )
    }
}

export default Boss